<?php
namespace Home\Model;
use Think\Model;
class ResouseModel extends Model {
    public function getResouseList($cond=null){
    	$res = M('resouse')->where($cond)
    		->select();
    	return $res;
    }
    
    public function insertResouseInfo($data){
    	if(!$data){
    		return false;
    	}
    	$res = M('resouse')->add($data);
    	return $res;
    }
    
    public function insertResouseList($data){
    	if(!$data){
    		return false;
    	}
    	$res = M('resouse')->addAll($data);
    	return $res;
    }
    
    public function getResouseInfo($cond){
    	if(!$cond){
    		return false;
    	}
    	$res = M('resouse')->where($cond)
    		->find();
    	return $res;
    }
    
    public function reviseResouseInfo($cond,$data){
    	if(!$cond || !$data){
    		return false;
    	}
    	$res = M('resouse')->where($cond)
    		->save($data);
    	return $res;
    
    	
    }
}